package cn.swust.designpatternlearningplatform.dao;

import cn.swust.designpatternlearningplatform.dao.sql.SelfTrainingDaoSql;
import cn.swust.designpatternlearningplatform.domain.entity.KnowledgePoint;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.SelectProvider;

import java.util.List;

@Mapper
public interface SelfTrainingDao {
    @Results(value = {
            @Result(property = "pointId",column = "point_id"),
            @Result(property = "parentId",column = "parent_id"),
            @Result(property = "pointContent",column = "point_content"),
    })
    @SelectProvider(type = SelfTrainingDaoSql.class,method = "getAllPoint")
    List<KnowledgePoint> getAllPoint();
   @SelectProvider(type = SelfTrainingDaoSql.class,method = "getTopicByPointId")
    List<Integer> getTopicByPointId(Integer pointId);
}
